Xbasic

a5_scale_imageblob Function

Syntax

B a5_scale_imageBlob(B blobIn ,C blobTypeIn ,C blobTypeOut ,N scale [,N maxSize [,C units [,C appliesTo [,C scaleMethod [,N width [,N height [,L flagOKToUseImageMagic ]]]]]]])

Arguments

blobInBinary

The image to scale.

blobTypeInCharacter

The type of the image to scale. Can be one of the following values: ".png", ".jpg", ".jpeg", ".bmp".

blobTypeOutCharacter

The type of the scaled image. Can be one of the following values: ".png", ".jpg", ".jpeg", ".bmp".

scaleNumeric

A decimal number to scale the image. E.g. 0.5 = 50% of original size, 1.5 = 150% of original size. If size is 0, you can specify the maxSize property.

maxSizeNumeric

Default = 0. The dimension in inches or pixels of the height, width, or maximum dimention of the image. This property is only used if scale is set to 0.

unitsCharacter

Default = "inches". Defines the dimension unit for the maxSize property. Can be "inches" or "pixels".

appliestoCharacter

Default = "Max". The dimension the maxSize is applied. appliesto can have a value of "Width" (maxSize is applied to the image width), "Height" (maxSize is applied to the image height), or "Max" (maxSize is applied to larger of width and height.)

scaleMethodCharacter

Default = "Proportional". Defines the scaling method.

widthNumeric

Default = 0.

heightNumeric

Default = 0.

flagOKToUseImageMagicLogical

Default = .T..

Description

Scales an image blob. Input and output supported image types: .png, .jpg, .jpeg, .bmp. Scale is a decimal number. e.g. .5 = 50% of original size, 1.5 is 150% of original size. If scale is set to 0 you can specify maxSize - the dimension in inches or pixels of the height, width, or maximum dimension of the image. Units is 'inches' or 'pixels'. AppliesTo is 'Max', 'Width' or 'Height'.